package com.example.demo.controller;

import com.example.demo.entity.Result;
import com.example.demo.service.impl.RoleServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("sys/role")
public class RoleController {
    @Autowired
    private RoleServiceImpl roleService;

    @GetMapping("getRole")
    public Result getAllUser(@RequestParam Map<String,Object> params){
        return roleService.getRole(params);
    }


    @PostMapping("insertRole")
    public Result insertRole(@RequestBody Map<String,Object> params){
        return roleService.insertRole(params);
    }

    @GetMapping("deleteRole")
    public Result deleteRole(@RequestParam Map<String,Object> params){
        return roleService.deleteRole(params);
    }


}
